🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / ui / src / commonMain / kotlin / org / meshtastic / core / ui / component / NodeSignedStatusIcon.kt
Displaying Raw • Download
core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/component/NodeSignedStatusIcon.kt 01cd54907d62cd90913d3d071b6bc240cae365ef (01cd5490) Text, 2.83 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ui.component
Tff7b72import T7ee787androidx.compose.material3.AlertDialog
Tff7b72import T7ee787androidx.compose.material3.Icon
Tff7b72import T7ee787androidx.compose.material3.IconButton
Tff7b72import T7ee787androidx.compose.material3.MaterialTheme
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.material3.TextButton
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.getValue
Tff7b72import T7ee787androidx.compose.runtime.mutableStateOf
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.runtime.setValue
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.security_icon_help_dismiss
Tff7b72import T7ee787org.meshtastic.core.resources.security_signed_node
Tff7b72import T7ee787org.meshtastic.core.resources.security_signed_node_help
Tff7b72import T7ee787org.meshtastic.core.ui.icon.MeshtasticIcons
Tff7b72import T7ee787org.meshtastic.core.ui.icon.ShieldCheck
Tff7b72import T7ee787org.meshtastic.core.ui.theme.StatusColors.StatusGreen
T8b949e/** The plain-language "signed node" explanation, shared by [NodeSignedStatusIcon] and the node-details signed row. */
Tf0883e@Composable
Tff7b72fun Td2a8ffSignedNodeDialogTb4b4b4(Te6edf3onDismissTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4) Tb4b4b4{
Te6edf3AlertDialogTb4b4b4(
Te6edf3onDismissRequest Tff7b72= Te6edf3onDismissTb4b4b4,
Te6edf3title Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3security_signed_nodeTb4b4b4)Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3text Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3security_signed_node_helpTb4b4b4)Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3confirmButton Tff7b72= Tb4b4b4{
Te6edf3TextButtonTb4b4b4(Te6edf3onClick Tff7b72= Te6edf3onDismissTb4b4b4) Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3security_icon_help_dismissTb4b4b4)Tb4b4b4) Tb4b4b4}
Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
T8b949e/** The "signed node" shield (XEdDSA), tappable like [NodeKeyStatusIcon] — tap opens [SignedNodeDialog]. */
Tf0883e@Composable
Tff7b72fun Td2a8ffNodeSignedStatusIconTb4b4b4(Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4) Tb4b4b4{
Tff7b72var Te6edf3showDialog Tff7b72by Te6edf3remember Tb4b4b4{ Te6edf3mutableStateOfTb4b4b4(Tff7b72falseTb4b4b4) Tb4b4b4}
Tff7b72if Tb4b4b4(Te6edf3showDialogTb4b4b4) Te6edf3SignedNodeDialogTb4b4b4(Te6edf3onDismiss Tff7b72= Tb4b4b4{ Te6edf3showDialog Tff7b72= Tff7b72false Tb4b4b4}Tb4b4b4)
Te6edf3IconButtonTb4b4b4(Te6edf3onClick Tff7b72= Tb4b4b4{ Te6edf3showDialog Tff7b72= Tff7b72true Tb4b4b4}Tb4b4b4, Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4) Tb4b4b4{
Te6edf3IconTb4b4b4(
Te6edf3imageVector Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3ShieldCheckTb4b4b4,
Te6edf3contentDescription Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3security_signed_nodeTb4b4b4)Tb4b4b4,
Te6edf3tint Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3colorSchemeTb4b4b4.Te6edf3StatusGreenTb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s